<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>

    let list = [
      { name: '张三', age: 19 },
      { name: '李四', age: 17 },
      { name: '王五', age: 18 },
      { name: '张麻子', age: 18 },
      { name: '小明', age: 17 },
    ]

    let result1 = list.find(item => {
      return item.age === 18
    })

    let result2 = list.filter(item => {
      return item.age === 18
    })

    console.log(result1,result2);
  </script>
</body>

</html>